package nomo.controller;


import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import nomo.model.Orderdetail;
import nomo.service.IOrderDetailServlet;

@RestController
@RequestMapping("orderdetail")
public class OrderdetailController {
	@Resource
	private IOrderDetailServlet orderDetailServlet;
	@RequestMapping("findByOId.do")
	public Map findByOID(int id) {
		Map map=new HashMap();
		map.put("code", "");
		map.put("msg", "0");
		map.put("count","100");
		map.put("data", orderDetailServlet.findByOID(id));
		return map;
		
	}
	@RequestMapping("addDetail.do")
	public int addDetail(Orderdetail od) {
		return orderDetailServlet.addDetail(od);
		
	}

}
